package cj.web.kly.service;
/*
 *  
 *  
*/
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cj.web.kly.domain.GroupDep;
import cj.web.kly.dao.GroupDepDAO;

/**
 * 
 * @author 
 *
 */
@Service
public class GroupDepService{

	@Autowired
    private GroupDepDAO groupDepDAO;
	
	/**
	 * 查询
	 * @param groupDep
	 * @return groupDeplis;size
	 */
	public Map query(GroupDep groupDep){
		Map rep = new HashMap();
		List<GroupDep> groupDeplis = groupDepDAO.query(groupDep);
		int size = groupDepDAO.querySize(groupDep); 
		rep.put("groupDeplis", groupDeplis);
		rep.put("size", size);
		return rep;
    }
	
	public List<GroupDep> queryByGroupId(int groupId){
		List<GroupDep> objlis = groupDepDAO.queryByGroupId(groupId);
		return objlis;
    }
	
	public GroupDep queryById(int id){
		GroupDep obj = groupDepDAO.queryById(id);
		return obj;
    }
	
	public void create(GroupDep groupDep){
		groupDepDAO.create(groupDep);
	}
	
	public void update(GroupDep groupDep){
		groupDepDAO.update(groupDep);
	}
	
	public void deleteById(int id){
		groupDepDAO.deleteById(id);
	}
}